import { store } from '@oaexpert/store'
import { defineStore } from 'pinia'
import { reactive, ref } from 'vue'

interface AppConfig {
  theme: string
}

export const useAppStore = defineStore('app', () => {
  const appConfig = reactive<AppConfig>({
    theme: '#1161ff',
  })
  const loginLoading = ref<boolean>(false)

  return { appConfig, loginLoading }
})

export function useAppStoreWithOut() {
  return useAppStore(store)
}
